<template>
  <div class="chat-dialog">
    <div v-for="(message, index) in values.messages" :key="index" class="message">
      <div v-if="message.isUser" class="user-message">
        {{ message.text }}
      </div>
      <div v-else class="assistant">
        <div class="avatar"></div>
        <div class="assistant-message">{{ message.text }}</div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
let values = defineProps(['messages'])
</script>

<style scoped lang="less">
@import url('@/views/ai-chat/components/chat.less');
</style>